{{#* inline 'getViewDataModel' container}}
{{#if container.psAppViewLogics}}
	{{#each container.psAppViewLogics as | viewLogic |}}
    {{#and viewLogic.name 'opendata' viewLogic.psAppUILogic viewLogic.psAppUILogic.openDataPSAppView viewLogic.psAppUILogic.openDataPSAppView.refPSAppView}}
openData: {
  deCodeName: '{{#if viewLogic.psAppUILogic.openDataPSAppView.refPSAppView.psAppDataEntity}}{{lowerCase viewLogic.psAppUILogic.openDataPSAppView.refPSAppView.psAppDataEntity.codeName}}{{/if}}',
  openDataViewName: '{{viewLogic.psAppUILogic.openDataPSAppView.refPSAppView.codeName}}',
      {{#if viewLogic.psAppUILogic.openDataPSAppView.psNavigateContexts}}
  navContext:"{{> @macro/common/navparam.hbs appNavParams=viewLogic.psAppUILogic.openDataPSAppView.psNavigateContexts}}",
      {{/if}}
      {{#if viewLogic.psAppUILogic.openDataPSAppView.psNavigateParams}}
  navViewParams:"{{> @macro/common/navparam.hbs appNavParams=viewLogic.psAppUILogic.openDataPSAppView.psNavigateParams}}",
      {{/if}}
},
    {{/and}}
    {{#and viewLogic.name 'newdata' viewLogic.psAppUILogic viewLogic.psAppUILogic.newDataPSAppView viewLogic.psAppUILogic.newDataPSAppView.refPSAppView}}
newData: {
  deCodeName: '{{#if viewLogic.psAppUILogic.newDataPSAppView.refPSAppView.psAppDataEntity}}{{lowerCase viewLogic.psAppUILogic.newDataPSAppView.refPSAppView.psAppDataEntity.codeName}}{{/if}}',
  newDataViewName: '{{viewLogic.psAppUILogic.newDataPSAppView.refPSAppView.codeName}}',
      {{#if viewLogic.psAppUILogic.newDataPSAppView.psNavigateContexts}}
  navContext:"{{> @macro/common/navparam.hbs appNavParams=viewLogic.psAppUILogic.newDataPSAppView.psNavigateContexts}}",
      {{/if}}
      {{#if viewLogic.psAppUILogic.newDataPSAppView.psNavigateParams}}
  navViewParams:"{{> @macro/common/navparam.hbs appNavParams=viewLogic.psAppUILogic.newDataPSAppView.psNavigateParams}}",
      {{/if}}
  entityName: '{{viewLogic.psAppUILogic.newDataPSAppView.refPSAppView.psAppDataEntity.codeName}}'
},
    {{/and}}
	{{/each}}
{{/if}}
{{/inline}}
caption: "{{page.caption}}",
title: "{{page.title}}",
capPSLanguageRes: "{{page.capPSLanguageRes.lanResTag}}",
titlePSLanguageRes: "{{page.titlePSLanguageRes.lanResTag}}",
showDataInfoBar: {{#if page.showDataInfoBar}}true{{else}}false{{/if}},
codeName: '{{page.codeName}}',
ctrls: [
{{#if (and page.psViewLayoutPanel page.psViewLayoutPanel.psControls)}}
  {{#each page.psViewLayoutPanel.psControls as | ctrl |}}
  {
    name: '{{ctrl.name}}',
    codeName: '{{ctrl.codeName}}',
    controlType: '{{ctrl.controlType}}'
  }{{#unless @last}},{{/unless}}
  {{/each}}
{{else}}
  {{#if page.ctrls}}
    {{#each page.ctrls as | ctrl |}}
  {
    name: '{{ctrl.name}}',
    codeName: '{{ctrl.codeName}}',
    controlType: '{{ctrl.controlType}}'
  }{{#unless @last}},{{/unless}}
    {{/each}}
  {{/if}}
{{/if}}
],
{{#if page.psViewLayoutPanel.useDefaultLayout}}
cssName: "{{#if page.psSysCss}}{{page.psSysCss.cssName}}{{/if}}",
{{else}}
cssName: "{{#if page.psViewLayoutPanel.psSysCss}}{{page.psViewLayoutPanel.psSysCss.cssName}}{{/if}}",
{{/if}}
name: "{{page.name}}",
viewType: "{{page.viewType}}",
viewStyle: "{{page.viewStyle}}",
showCaption: {{#if page.showCaptionBar}}true{{else}}false{{/if}},
isLoadDefault: {{#if page.loadDefault}}true{{else}}false{{/if}},
{{#if page.psAppDataEntity}}
entityCodeName: "{{page.psAppDataEntity.codeName}}",
keyPSAppDEField: "{{page.psAppDataEntity.keyPSAppDEField.codeName}}",
majorPSAppDEField: "{{page.psAppDataEntity.majorPSAppDEField.codeName}}",
{{/if}}
{{#if page.enableQuickSearch}}
enableQuickSearch: true,
{{/if}}
expandSearchForm:{{#if page.expandSearchForm}}true{{else}}false{{/if}},
{{#and page.enableQuickGroup page.quickGroupPSCodeList}}
enableQuickGroup: true,
quickGroupCodeList: "{{page.quickGroupPSCodeList.codeListTag}}",
{{/and}}
{{!-- 存在视图布局面板，且是视图代理模式 --}}
{{#and page.psViewLayoutPanel (eq page.psViewLayoutPanel.useDefaultLayout false) page.psViewLayoutPanel.viewProxyMode}}
{{> getViewDataModel container=page.psViewLayoutPanel}}
{{else}}
{{> getViewDataModel container=page}}
{{/and}}
{{#page.ctrls}}
  {{#eq controlType 'TOOLBAR'}}
toolbarItems: [
  {{> @macro/widgets/toolbar/toolbar-item.hbs items=psDEToolbarItems view=page toolbar=this}}
],
  {{/eq}}
{{/page.ctrls}}
{{#if page.xDataControlName}}
xDataCtrlName: "{{page.xDataControlName}}",
{{/if}}
{{!-- {{#if page.psAppViewMsgGroup}}
viewMsgGroupName: "{{page.psAppViewMsgGroup.codeName}}",
{{/if}} --}}
{{> @macro/common/counter.hbs page=page}}
{{#if page.psViewLayoutPanel}}
useDefaultLayout: {{page.psViewLayoutPanel.useDefaultLayout}},
quickSearchPlaceholder: "{{#if page.psAppDataEntity}}{{#each page.psAppDataEntity.allPSAppDEFields as | field | }}{{#if field.enableQuickSearch}}{{field.logicName}}{{#unless @last}},{{/unless}}{{/if}}{{/each}}{{/if}}",
  {{#unless page.psViewLayoutPanel.useDefaultLayout}}
layoutMode: "{{page.psViewLayoutPanel.layoutMode}}",
rootLayoutDetailNames: [
    {{~#if page.psViewLayoutPanel.rootPSPanelItems~}}
      {{~#each page.psViewLayoutPanel.rootPSPanelItems as | panelItem |~}}
  "{{panelItem.name}}"{{#unless @last}},{{/unless}}
      {{~/each~}}
    {{~/if~}}
],
    {{#if page.psViewLayoutPanel.psControls}}
      {{#each page.psViewLayoutPanel.psControls as | ctrl |}}
        {{#eq ctrl.controlType 'TOOLBAR'}}
toolbarItems: [
  {{> @macro/widgets/toolbar/toolbar-item.hbs items=ctrl.psDEToolbarItems view=page toolbar=ctrl}}
],
        {{/eq}}
      {{/each}}
    {{/if}}
layoutItems: {
    {{#if page.psViewLayoutPanel.rootPSPanelItems}}
      {{#each page.psViewLayoutPanel.rootPSPanelItems as | panelItem |}}
  {{> @macro/widgets/panel-detail/include-panel.hbs type="PANELDETAILSMODEL" item=panelItem panelType="VIEWLAYOUT" xDataCtrlName=page.xDataControlName}}
      {{/each}}
    {{/if}}
},
  {{/unless}}
{{/if}}